package com.jxs.android.util;

import java.text.SimpleDateFormat;

import android.content.Context;

public class Timer {
	public static String getTime(Context context, long all) {
		String results = "";
		long hours = all / 3600;
		all = all % 3600;
		long minuties = all / 60;
		all = all % 60;
		long seconds = all;

		if (0 != hours && minuties != 0) {
			results = hours + "时" + minuties + "分" + seconds + "秒";
		} else if (0 == hours && minuties != 0) {
			results = minuties + "分" + seconds + "秒";
		} else if (0 == hours && minuties == 0) {
			results = seconds + "秒";
		}

		return results;
	}

	public static SimpleDateFormat getSDFyyyyMMdd() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
		return sdf;
	}

	public static SimpleDateFormat getSDFyyyyMM() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMM");
		return sdf;
	}

	public static SimpleDateFormat getSDFyyMMdd() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyMMdd");
		return sdf;
	}

	public static SimpleDateFormat getSDFyy__MM__dd() {
		SimpleDateFormat sdf = new SimpleDateFormat("yy/MM/dd");
		return sdf;
	}

	public static SimpleDateFormat getSDFyyyy_MM_dd() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		return sdf;
	}

	public static SimpleDateFormat getSDFyy_MM_dd() {
		SimpleDateFormat sdf = new SimpleDateFormat("yy-MM-dd");
		return sdf;
	}

	public static SimpleDateFormat getSDFyyMMddHHmmss() {
		SimpleDateFormat sdf = new SimpleDateFormat("yy-MM-dd HH:mm:ss.S");
		return sdf;
	}

}